package org.agora.photogallery.client.common.jin;

import org.agora.photogallery.client.AppController;
import org.agora.photogallery.client.common.EventBus;
import org.agora.photogallery.client.presenter.GalleryPresenter;
import org.agora.photogallery.client.presenter.PhotoCollectionPresenter;
import org.agora.photogallery.client.presenter.PhotoPresenter;
import org.agora.photogallery.client.service.PhotoService;
import org.agora.photogallery.client.service.PhotoServicePicasa;
import org.agora.photogallery.client.view.GalleryView;
import org.agora.photogallery.client.view.GalleryViewImpl;
import org.agora.photogallery.client.view.MainView;
import org.agora.photogallery.client.view.MainViewImpl;
import org.agora.photogallery.client.view.PhotoCollectionViewImpl;
import org.agora.photogallery.client.view.PhotoView;
import org.agora.photogallery.client.view.PhotoViewImpl;

import org.agora.photogallery.client.view.PhotoCollectionView;


import com.google.gwt.event.shared.HandlerManager;
import com.google.gwt.inject.client.AbstractGinModule;
import com.google.inject.Singleton;

public class GinModule extends AbstractGinModule{

	@Override
	protected void configure() {
		bind(AppController.class).in(Singleton.class);
		bind(PhotoService.class).to(PhotoServicePicasa.class).in(Singleton.class);
		bind(PhotoCollectionView.PhotoCollectionPresenter.class).to(PhotoCollectionPresenter.class).in(Singleton.class);
		bind(GalleryView.GalleryPresenter.class).to(GalleryPresenter.class).in(Singleton.class);
		bind(PhotoView.PhotoPresenter.class).to(PhotoPresenter.class).in(Singleton.class);
		bind(HandlerManager.class).to(EventBus.class).in(Singleton.class);
		bind(MainView.class).to(MainViewImpl.class).in(Singleton.class);
		bind(GalleryView.class).to(GalleryViewImpl.class).in(Singleton.class);
		bind(PhotoView.class).to(PhotoViewImpl.class).in(Singleton.class);
		bind(PhotoCollectionView.class).to(PhotoCollectionViewImpl.class).in(Singleton.class);
	}

}
